﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace DroidClaim.BL.Test
{
    public partial class TestSendJobToSurveyor : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                string claimInfoId = Request["claimInfoId"];
                string RegistrationId = Request["RegistrationId"];

                if (!string.IsNullOrEmpty(RegistrationId))
                {
                    GCMServices.Dto.MessageDto message = new GCMServices.Dto.MessageDto();
                    message.Code = "sendjob";
                    message.MessageJson = "{\"id\":" + claimInfoId + "}";
                    message.RegistrationId = RegistrationId;

                    GCMServices.IGCMServiceBl gcm = new GCMServices.GCMServiceBl();
                    gcm.SendMessage(message);

                    Response.Write("Send Message");
                }
                else
                {
                    Response.Write("Not Send Message");
                }
            }
            catch (Exception ex)
            {

                Response.Write("Error : " + ex.Message);
            }
        }
    }
}